/////////////////////////////////////////////////////////////////////////////
// Name:        networkpanel.h
// Purpose:     
// Author:      Brant Young
// Modified by: 
// Created:     Wed Jun 20 23:06:24 2007
// RCS-ID:      
// Copyright:   (C) Victsoft 2007
// Licence:     GPL 2.0
/////////////////////////////////////////////////////////////////////////////

#ifndef _NETWORKPANEL_H_
#define _NETWORKPANEL_H_

////@begin forward declarations
class wxBoxSizer;
class wxFlexGridSizer;


/*!
 * NetworkPanel class declaration
 */

class NetworkPanel: public wxPanel
{

public:
    /// Constructors
    NetworkPanel(wxWindow* p_parent);
    
    /// Destructor
    virtual ~NetworkPanel();


////@begin NetworkPanel member variables
    wxBoxSizer* p_root_sizer;
    wxStaticBox* p_conn_sizer_stc;
    wxStaticBoxSizer* p_conn_sizer;
    wxRadioButton* p_direct_rbtn;
    wxRadioButton* p_auto_rbtn;
    wxRadioButton* p_manual_rbtn;
    wxFlexGridSizer* p_proxy_sizer;
    wxRadioButton* p_http_rbtn;
    wxTextCtrl* p_http_ip_text;
    wxTextCtrl* p_http_port_text;
    wxRadioButton* p_socks4_rbtn;
    wxTextCtrl* p_socks4_ip_text;
    wxTextCtrl* p_socks4_port_text;
    wxRadioButton* p_socks5_rbtn;
    wxTextCtrl* p_socks5_ip_text;
    wxTextCtrl* p_socks5_port_text;
    /// Control identifiers
    enum {
        ID_NETWORK_PANEL = 10029,
        ID_DIRECT_RBTN = 10001,
        ID_AUTO_RBTN = 10002,
        ID_MANUAL_RBTN = 10003,
        ID_HTTP_RBTN = 10039,
        ID_HTTP_IP_TEXT = 10004,
        ID_HTTP_PORT_TEXT = 10013,
        ID_SOCKS4_RBTN = 10040,
        ID_SOCKS4_IP_TEXT = 10014,
        ID_SOCKS4_PORT_TEXT = 10015,
        ID_SOCKS5_RBTN = 10041,
        ID_SOCKS5_IP_TEXT = 10016,
        ID_SOCKS5_PORT_TEXT = 10017
    };
////@end NetworkPanel member variables    
    bool set_cfg();
    
    // events
    void OnConnectionType(wxCommandEvent& event);
    
protected :
    
    void InitEvents();
    
    void _init_cfg();
    
    void _init_conn_cfg();
    
    void _init_proxy_cfg();
};

#endif
    // _NETWORKPANEL_H_
